package com.fmsz.physicalheadline.interfaces;


import com.fmsz.physicalheadline.entity.events.EventRoot;
import com.fmsz.physicalheadline.entity.events.MatchContent;
import com.fmsz.physicalheadline.entity.news.NewsHomeEntity;
import com.fmsz.physicalheadline.entity.news.NewsTagEntity;
import com.fmsz.physicalheadline.entity.news.discuss.DiscussEntity;
import com.fmsz.physicalheadline.entity.news.discuss.DiscussNumEntity;
import com.fmsz.physicalheadline.entity.news.focus.FocusEntity;
import com.fmsz.physicalheadline.entity.news.focus.ItemDataEntity;
import com.fmsz.physicalheadline.entity.news.focus.ItemRecommendEntity;
import com.fmsz.physicalheadline.entity.root.RootEntity;
import com.fmsz.physicalheadline.entity.top.DynamicEntity;
import com.fmsz.physicalheadline.entity.top.HeadEntity;

import java.util.Map;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * Created by Administrator on 2016/12/15.
 */

public interface HttpService {
    //欢迎页广告图
    @GET("tiyu/rest/boot/curr")
    Call<RootEntity> getRoot();
    //新闻页tag数据
    @GET("tiyu/rest/channel/list?version=0&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false")
    Call<NewsTagEntity> getNewsTag();

    //新闻页列表数据
    @GET("tiyu/rest/content/list?contest_flag=true&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11")
    Call<NewsHomeEntity> getNewsHome(@Query("channel_id") int channel_id, @QueryMap Map<String, String> map);

    //新闻页列表焦点图二级页面数据  type==4
    @GET("tiyu/rest/content/topic?code=865682026799303&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false")
    Call<FocusEntity> getFocusActivityData(@Query("id") Long link);

    //新闻页二级页面数据  type==2
    @GET("tiyu/rest/content/view?code=865682026799303&s_channel_id=-1&comment=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false")
    Call<ItemDataEntity> getItemSecData(@Query("id") String id);

    //新闻页二级页面推荐列表数据
    @GET("http://api.lifxapi.com/tiyu/rest/content/recommend?machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false")
    Call<ItemRecommendEntity> getRecommendData(@Query("id") String id);

    //新闻二级页面评论列表数据
    @GET("tiyu/rest/comment/list?limit=20&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false")
    Call<DiscussEntity> getDiscussData(@Query("dashboard_id") String dashboard_id);

    //新闻二级页面评论数量
    @GET("tiyu/rest/comment/num?machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false")
    Call<DiscussNumEntity> getDiscussNum(@Query("dashboard_type") String dashboard_type, @Query("dashboard_data") String dashboard_data);

    //头条页面动态
    @GET("tiyu/rest/snapshot/list")
    Call<DynamicEntity> getTopDynamicData(@Query("start_id") String start_id);

    //头条头条新闻
    @GET("tiyu/rest/content/head")
    Call<HeadEntity> getTopHeadData();

    //比赛 热门推荐
    @GET("tiyu/rest/contest/recommend")
    Call<EventRoot> getHotMatch();

    //比赛 全部
    @GET("tiyu/rest/contest/time/channel")
    Call<EventRoot> getAllMatch();

    //比赛 NBA
    @GET("tiyu/rest/contest/time/channel?channel_id=1")
    Call<EventRoot> getNBAMatch();

    //比赛  中国足球
    @GET("tiyu/rest/contest/time/channel?channel_id=2")
    Call<EventRoot> getCFMatch();

    //比赛 国际足球
    @GET("tiyu/rest/contest/time/channel?channel_id=3")
    Call<EventRoot> getIFMatch();

    //比赛 中国篮球
    @GET("tiyu/rest/contest/time/channel?channel_id=4")
    Call<EventRoot> getCBMatch();
    //比赛二级页面
    @GET("tiyu/rest/contest/view")
    Call<MatchContent> getSecMatch(@Query("contest_id")long contest_id, @Query("contest_type")int contest_type);
}
